<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">
<h:head>
	<title>Livros</title>
</h:head>
<h:body>
	<h1>Novo Livro</h1>
	<h:form>
		<h:outputLabel value="Nome: " />
		<h:inputText value="#{livroMB.livro.nome}" />
		<h:outputLabel value="Preço: " />
		<h:inputText value="#{livroMB.livro.preco}" />
		<h:commandButton action="#{livroMB.adiciona}" value="Salvar" />
	</h:form>
	<h1>Lista de Livros</h1>
	<h:dataTable value="#{livroMB.livros}" var="livro">
		<h:column>
			<h:outputText value="#{livro.nome}" />
		</h:column>
		<h:column>
			<h:outputText value="#{livro.preco}" />
		</h:column>
	</h:dataTable>
</h:body>
</html>

